/* 
 * File:   header.h
 * Author: hp
 *
 * Created on 2011年3月11日, 上午9:32
 */

#ifndef HEADER_H
#define	HEADER_H

#ifdef	__cplusplus
extern "C" {


#endif


#define LISTENQ 10
#define buffer_size 1000*1000
#define HTTP_PORT 80
#define ENTRY_NUMBER  1000

    long int cache_size;
    long int cache_left;
    int cachetime;  //sec
    char* ip_addr;
    int serv_port;

    struct entry{
        char* name;
        char* host;
        char* path;
        char* date;
        char* content;
        long sec;
        long size;
        struct entry *next;
    };

    struct entry *head;

    pthread_mutex_t mutex_head;
    pthread_mutex_t mutex_cache_left;




#ifdef	__cplusplus
}
#endif

#endif	/* HEADER_H */

